<?php 
namespace App\Service;

use App\Model\OutTradeModel;
use log;

class OutTradeService extends BaseService
{

	public static $instance = null;

	public static function getInstance()
	{
		if (self::$instance == null) {
			self::$instance = new self();
		}
		return self::$instance;
	}

	public function getTradeStatusMap($status)
	{
		switch ($status) {
			case 'full_package': 
				return OutTradeModel::$tradeStatusMap['error-4'];
			case 'no_exist_item':
				return OutTradeModel::$tradeStatusMap['error-2'];
			case 'steam_no_response':
				return OutTradeModel::$tradeStatusMap['error-6'];
			case 'can_send_trade':
				return OutTradeModel::$tradeStatusMap['error-3'];
			case 'too_maney_trade':
				return OutTradeModel::$tradeStatusMap['error-5'];
			default:
                return false;
		}
	}
}